package com.design.proxy.staticproxy;

/**
 * @auther LiZiBa
 * @date 2020/8/9 10:26
 * @description:
 **/
public class ZhangLaoSan implements IPerson{

    private Zhangsan zhangsan;

    public ZhangLaoSan(Zhangsan zhangsan) {
        this.zhangsan = zhangsan;
    }

    @Override
    public void findLove() {
        before();
        zhangsan.findLove();
        after();
    }

    private void before() {
        System.out.println("zhanglaosan 物色");
    }

    private void after() {
        System.out.println("zhangsan 开始交往");
    }

    @Override
    public String toString() {
        return "ZhangLaoSan{" +
                "zhangsan=" + zhangsan +
                '}';
    }
}
